package com.yzh.croom.service.impl;

import com.yzh.croom.mapper.UserMapper;
import com.yzh.croom.model.domain.User;
import com.yzh.croom.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class AdminServiceImpl implements AdminService {
    @Autowired
    private UserMapper userMapper;

    @Override
    public int addAdmin(User user) {
        return userMapper.addAdmin(user);
    }

    @Override
    public List<User> getAllAdmin() {
        return userMapper.getAllAdmin();
    }

    @Override
    public int updateStatus(String account, int status) {
        return userMapper.updateStatus(account,status);
    }
}
